home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 May / Macworld (1999-05).dmg / Shareware World / Utilities / Compress / MacZip 1.02 final / docs / README.TXT < prev    next >
Encoding:
Text File  |  1999-03-23  |  21.1 KB  |  530 lines  |  [TEXT/R*ch]

  1. Macintosh Port of Info-Zip's Zip
  2. by Dirk Haase, d_haase@sitec.net
  3. homepage:   www.sitec.net/maczip
  4. 15. January 1999
  5. ================================
  6.  
  7.  
  8. Some notes about this port:
  9. ===========================
  10.  
  11. MacZip requires at least System 7 and a Macintosh with a minimum of a 
  12. Motorola 68020 or PowerPC 601 processor. Other configurations may work
  13. but it is not tested at all.
  14.  
  15. The application is distributed as a fat binary with both regular 68K 
  16. and native PowerPC versions included.
  17.  
  18. Move the executable(s) somewhere--for example, drag it (or them) to your
  19. Applications folder.  For easy access, make an alias in the Launcher Control
  20. Panel or directly on your desktop.
  21. The GUI is very simple. It was not my intention to make a full-blown GUI,
  22. however I think it is comfortable enough to use it as regular tool.
  23.  
  24. This port supports also Apple-event.So you can install it in your
  25. WWW-Browser as a helper-app.
  26.  
  27. For more Info about the contents of this package, take a look into
  28. the "macos/Contents" (or :macos:Contents) file. Some notes on how to
  29. rebuild the Macintosh applications can be found in INSTALL.
  30.  
  31.  
  32.  
  33. Usage:
  34. ------
  35.  
  36. Basically there are four ways to start MacZip:
  37.  
  38. a) Drag'n Drop
  39.    To extract an archive drop an archive on MacZip.
  40.    To compress files drop a file, folder or volume on MacZip.
  41.    Note: You can not drop more than one item at the same time.
  42.    
  43.    
  44.  
  45. b) using the Dialog box (Menu: File -> Zip/Unzip):
  46.    * Compression (Zip):
  47.    - Go to "File -> Zip"and the "Zip Options" Dialog Box appears.
  48.    - Click on "Location of the compressed File"
  49.    - The "Select an archive" dialog box appears      
  50.         a) select a existing zip archive
  51.            -> Your files will be added to that zip archive.
  52.         b) select a folder and name your new zip archive
  53.            -> a new zip archive will be created with your files.
  54.    - Select one or more check boxes if you want.
  55.         see Zip.txt for more information.
  56.    - Click on "File or Folder to Compress"
  57.    - The "Select a File or Folder" dialog box appears      
  58.         a) select a file
  59.            -> This file will be compressed.
  60.         b) select a folder
  61.            -> the contents of the folder will be compressed.
  62.    - Click on "Start Unzip" to start the task.
  63.    
  64.   * Extraction (Unzip):
  65.    - Go to "File -> Unzip"and the "Unzip Options" Dialog Box appears.
  66.    - Click on "Location of the compressed File"
  67.    - The "Select an archive" dialog box appears      
  68.    - select a existing zip archive
  69.    - Select one or more check boxes if you want.
  70.         see Unzip.txt for more information.
  71.    - Click on "Location of the extracted Files"
  72.    - The "Select a Folder" dialog box appears      
  73.         a) select a file
  74.            -> This file will be compressed.
  75.         b) select a folder
  76.            -> the contents of the archive will be extracted 
  77.               into this folder.
  78.    - Click on "Start Unzip" to start the task.
  79.     
  80.      
  81.      
  82. c) Using the Commandline (Menu: File->Command Line):
  83.    The zip & unzip tools are command line tools. So the behavior is exactly 
  84.    the same like the zip & unzip tools on unix or win. This means if you 
  85.    want zip some files you have to write a command line like this: 
  86.    "zip [switches] path_to_zip_archive path_to_files_folders"
  87.    
  88.    - Go to "File" and select "Command Line" and the "MacZip Entry box" 
  89.      Dialog Box appears.
  90.  
  91.    An example:
  92.  
  93.    a: your zip may be created at
  94.            Macintosh HD:applications:archive.zip
  95.  
  96.    b: your files may be found at
  97.            Macintosh HD:somewhere:my_folder_to_archive:*
  98.  
  99.    Note: At the end of the path there must be a filename or a wild card !
  100.    (see Footnote: 1 wild card, 2 Mac pathnames)
  101.    
  102.    So the command line should look like (one line!):
  103.  
  104.    zip "Macintosh HD:applications:archive.zip" "Macintosh HD:somewhere:my_folder_to_archive:*"
  105.    
  106.    - Click on "Enter" to start the task.
  107.  
  108.    Since you can not set a default folder you have to enter always a 
  109.    full qualified path names. Full qualified path names are path names 
  110.    including the Volume name ! (see Footnote: 2 Mac pathnames)
  111.      
  112.      
  113.      
  114. d) Using Applescript:
  115.  
  116. There is only one additional event defined: "do_cmd". You can enter 
  117. every valid command line. The first word must be "zip" or "unzip" to
  118. select the action (compress or extraction).
  119.  
  120. See sample Applescript:
  121.  
  122.         tell application "MacZip (PPC)"
  123.             activate
  124.             with timeout of 90000 seconds
  125.                 do_cmd "zip -rjjN Volume:archive \"My Volume:*\" "
  126.             end timeout
  127.         end tell
  128.  
  129. This script opens MacZip, brings it to the foreground on the Mac, starts the zip 
  130. action with the command line: zip -rjjN Volume:archive "My Volume:*" .
  131.  
  132.  
  133.  
  134.  
  135. A short introduction is also available online:
  136. http://www.sitec.net/maczip/How-To-Do/  
  137.  
  138. It's possible to stop the run of Zip/Unzip with the well
  139. known shortcut [Command] + [.].
  140.  
  141.  
  142. ---------------------------------------------------------------------------
  143.  
  144. There are some Mac-specific switches available.
  145. Zip Module:
  146.        -df    [MacOS   only]  Include  only  data-fork  of  files
  147.               zipped into the archive.  Good for exporting  files
  148.               to  foreign operating-systems.  Resource-forks will
  149.               be ignored at all.
  150.  
  151.        -jj    [MacOS  only] record Fullpath (+ Volname). The com-
  152.               plete  path  including  volume  will  be stored. By
  153.               default the relative path will be stored.
  154.  
  155.        -S     Include system and hidden  files.  This  option  is
  156.               effective  on  some  systems only; it is ignored on
  157.               Unix.  On MacOS, this option includes finder invis-
  158.               ible files, which are ignored otherwise.
  159.  
  160. Unzip Module:
  161.        -E     [MacOS only] display contents of MacOS extra  field
  162.               during restore operation.
  163.  
  164.        -i     [MacOS only] ignore filenames stored in MacOS extra
  165.               fields.  Instead,  the  most  compatible   filename
  166.               stored in the generic part of the entry's header is
  167.               used.
  168.  
  169.        -J     [MacOS only] ignore MacOS extra fields.  All Macin-
  170.               tosh  specific  info  is  skipped.  Data-fork   and
  171.               resource-fork are restored as separate files.
  172.  
  173.  
  174. Select [File]->[Get Help on Zip/Unzip] for a complete list 
  175. of switches.
  176.  
  177.  
  178.  
  179. Limitations / Problems:
  180. -----------------------
  181.  
  182.     - Aliases are not supported. I tried, but I got broken aliases
  183.       This port will silently ignore all aliases.
  184.       It's on my to-do list for future releases.
  185.  
  186.     - Zip needs much memory to compress many files:
  187.       You may need to increase the 'Preferred Size' in 'Get Info'.
  188.       Values of 12 Megabytes or more are possible
  189.  
  190.     - Unzip needs about 500 Kbyte of memory to unzip no matter
  191.       how many files were compressed and expanded.
  192.  
  193.     - and finally one big macintosh-related problem:
  194.       This port has one weak point: It's based on pathnames.
  195.       As you may be already know: Pathnames are not unique on a Mac !
  196.       The main reason is that an attempt to implement support exact saving of
  197.       the MacOS specific internal file-structures would require a throughout
  198.       rewrite of major parts of shared code, probably sacrifying compatibility
  199.       with other systems.
  200.       I have no solution at the moment. The port will just warn you if you try
  201.       zip from / to a volume which has a duplicate name.
  202.       MacZip has problems to find the archive or the files.
  203.       My (Big) recommendation: Name all your volumes with a unique name and
  204.       MacZip will run without any problem.
  205.  
  206.  
  207. Known Bugs:
  208.  
  209.     - crypted files in a zip archive are sometimes corrupt:
  210.       I get an error message: invalid compressed data to inflate.
  211.       Appearance of this error is purly be change:
  212.       I did a small test: Unzipping an archive containing 3589 files
  213.       56 files fails to unzip, so about 1.5%.
  214.       Rootcause is completly unclear to me :(
  215.       
  216. I strongly recommend to test your archive (eg. unzip -t archive).
  217.  
  218.  
  219.  
  220.  
  221. Zip-Programs / Macintosh Extra-Data:
  222. -----------------------------------------
  223. A brief overview:
  224. Currently, as far as I know, there are 4 Zip-Programs available 
  225. for the Macintosh platform.
  226. These programs build (of cause) different variants of Zip-Files:
  227.  
  228.     - Info-Zip's first Port of Zip. Ported by Johnny Lee
  229.       This Port is rather outdated and no longer supported (since 1992).
  230.       68K only. Only minimal Mac-info is stored (Creator/Type,
  231.       Finderattributes). Creator/Type: '????' / '????'
  232.       Until year 1998, Only Unzip 5.32 survived.
  233.  
  234.     - ZipIt by Tom Brown. This is Shareware and still supported I think.
  235.       ZipIt has a nice GUI, but I found it can't handle large Zipfiles
  236.       quite well. ZipIt compresses Macintosh files using the MacBinary
  237.       format. So, transfering files to other platforms is not so easy.
  238.       Only minimal Mac-info is stored (Creator/Type, Finderattributes).
  239.       Macfilenames are changed to a most compatible filename.
  240.       Creator/Type: 'ZIP ' / 'ZIP '
  241.  
  242.     - PKZIP/mac v2.03/210d. This is Shareware.
  243.       This Zip implementation for the Mac can be found on ASI's website
  244.       (http://www.asizip.com/products/products.htm).  The name of this
  245.       program is misleading, it is NOT a product from PKWARE.  ASI last
  246.       release version is v2.03, and they also offer a newer beta version
  247.       PKZIP/mac 210d. But even the Beta version is rather outdated (1995).
  248.       Only minimal Mac-info is stored (Creator/Type, Finderattributes).
  249.       The Zipfile format looks like incompatible to other platforms.
  250.       (More details about the compatibility issue can be found in
  251.       proginfo/3rdparty.bug!). Type: 'PKz1'
  252.       Macfilenames are restored without any change.
  253.  
  254. and finally:
  255.     - Info-Zip's latest Port of Zip. MacZip 1.0. Ported by me :-)
  256.       It is supported (of cause) and up to date. Fullset of macintosh
  257.       info is stored: Creator/Type, Finderattributes, Findercomments,
  258.       MacOS 8.0 Foldersettings, Icon/Folder-Positions ...
  259.       Macfilenames are restored without any change.
  260.       Creator/Type: 'IZip' / 'ZIP '
  261.       
  262.  
  263. Compatibility of my port; Extraction:
  264.    - Archives from Info-Zip's first port (by Johnny Lee) are still compatible.
  265.    - Extraction of ZipIt archives are supported. This support is not 
  266.      complete: Filenames are korrect but Directory names are sometimes mangled
  267.      to a dos compatible form. Segmented archives are not supported.
  268.    - PKZiP/mac archives-files are extracted without resource-forks
  269.      and without any Finderinfo. I have no information about that zip-format.
  270.  
  271. Compatibility of my port; Compression:
  272.    - My port supports only the new Info-Zip format
  273.      (introduced with this port). Therefore archives created by MacZip 1.0
  274.      (1999) must be extracted with this version or later releases of Info-ZIP's
  275.      UnZip to restore the complete set of Macintosh attributes.
  276.  
  277. Note: This port is complete unrelated to the shareware ZipIt. Even more,
  278. handling of special Macintosh attributes is incompatible with ZipIt.
  279. This port (MacZip) may be used to extract archives created by ZipIt,
  280. but make sure that you get the result as you expected.
  281.  
  282.  
  283.  
  284. Macintosh Files; File Forks:
  285. ----------------------------
  286.  
  287. All Macintosh files comprise two forks, known as the data fork and the
  288. resource fork.  Unlike the bytes stored in the resource fork, the bytes in
  289. the data fork do not have to exhibit any particular internal structure.
  290. The application is responsible for interpreting the bytes in the data fork
  291. in whatever manner is appropriate. The bytes in the resource fork usually
  292. have a defined internal structure and contain data object like menus,
  293. dialog-boxes, icons and pictures.
  294. Although all Macintosh files contain both a data fork and a resource fork,
  295. one or both of these forks may be empty.
  296.  
  297. MacZip stores data-forks and resource-forks separatly. The Zipfile-Format
  298. does not allow to store two archive entries using exactly the same name.
  299. My solution is to modify the Pathname of the resource-fork. All resource-fork
  300. names are prepended with a leading special directory named "XtraStuf.mac".
  301. So, when extracting on a Mac, you should never see this directory
  302. "XtraStuf.mac" on your *disk*.
  303.  
  304. On all foreign systems that support directories in filenames (e.g: OS/2, Unix,
  305. DOS/Windows, VMS) you will get a directory "XtraStuf.mac" when extracting
  306. MacZip archives.
  307. You can delete the complete directory "XtraStuf.mac" since Mac-resources
  308. do not make much sense outside the MacOS world.
  309.  
  310.  
  311.  
  312. Textencoding; Charsets of the Filenames:
  313. ----------------------------------------
  314.  
  315. The following information is only important if you plan to transfer
  316. archives across different platforms/language systems:
  317.  
  318. A typical Zip-archive does not support different charsets. All filenames
  319. stored in the public area (= accessible by foreign systems other
  320. than MacOS) must be coded in the charset ISO-8859-1 (CP1252 in the Microsoft
  321. Windows world) or CP850 (DOSLatin1). The latter should only be used by
  322. Zip programs that mark the archive entries as "created under DOS".
  323. Apart from Macs, the commonly used platforms either support ISO-8859-1
  324. directly, or are compatible with it.
  325. To achieve maximum compatibility, MacZip convert filenames from the
  326. Mac OS Roman character set to ISO-8859-1 and vice versa.
  327. But not every char of the charset MacRoman has their equivalent
  328. in ISO-8859-1. To make the mapping in most cases possible, I chose
  329. most similar chars or at least the MIDDLE DOT. 
  330.  
  331. Mac OS Roman character set is used for at least the following Mac OS
  332. localizations:
  333. U.S., British, Canadian French, French, Swiss French,
  334. German, Swiss German, Italian, Swiss Italian, Dutch,
  335. Swedish, Norwegian, Danish, Finnish, Spanish, Catalan,
  336. Portuguese, Brazilian, and the default International system.
  337.  
  338. In all Mac OS encodings, character codes 0x00-0x7F are identical to
  339. ASCII, except that
  340.   - in Mac OS Japanese, yen sign replaces reverse solidus
  341.   - in Mac OS Arabic, Farsi, and Hebrew, some of the punctuation in this
  342.     range is treated as having strong left-right directionality,
  343.     although the corresponding Unicode characters have neutral
  344.     directionality
  345. So, for best compatibility, confine filenames to the standard
  346. 7-bit ASCII character set.
  347.  
  348. If you generate a filename list of your archive (unzip -l), you will
  349. see the converted filenames. Your can also extract the archive with
  350. the switch '-i' (= ignore mac filenames), and test your result.
  351.  
  352. This MacZip-port uses its own filename stored in the archive.
  353. At the moment, the filename will be not converted. However,
  354. I'm planning to add support for unicode.
  355.  
  356. Currently, the following Mac OS encodings are NOT supported:
  357. Japanese, ChineseTrad, Korean, Arabic, Hebrew, Greek, Cyrillic,
  358. Devanagari, Gurmukhi, Gujarati, Oriya, Bengali, Tamil, Telugu
  359. Kannada, Malayalam, Sinhalese, Burmese, Khmer, Thai, Laotian,
  360. Georgian, Armenian, ChineseSimp, Tibetan, Mongolian, Ethiopic,
  361. Vietnamese, ExtArabic and finally:
  362. Symbol - this is the encoding for the font named "Symbol". 
  363. Dingbats - this is the encoding for the font named "Zapf Dingbats".
  364. If you extract an archive coded with one of these charsets
  365. you will propably get filenames with funny characters. 
  366.  
  367. These problems apply only to filenames and NOT to the file
  368. content.
  369. Of cause: The content of the files will NEVER be converted !!
  370.  
  371.  
  372.  
  373. File-/Creator Type:
  374. -------------
  375.  
  376. This port uses the creator type 'IZip' and it is registered at Apple
  377. (since 08. March 1998). File types can not be registered any more.
  378. This port uses 'ZIP ' for Zip archive files.
  379. The creator 'IZip' type should be used for all future versions.
  380.  
  381.  
  382.  
  383. Hints for proper restoration of filetime stamps:
  384. ------------------------------------------------
  385.  
  386. UnZip requires the host computer to have proper timezone information in
  387. order to handle certain tasks correctly (see unzip.doc).  To set the
  388. timezone on the Macintosh, go to the Map Control Panel and enter the
  389. correct number of hours (and, in a few locales, minutes) offset from
  390. Universal Time/Greenwich Mean Time.  For example, the US Pacific timezone
  391. is -8 hours from UTC/GMT during standard (winter) time and -7 hours from
  392. UTC/GMT during Daylight Savings Time.  The US Eastern timezone is -5 hours
  393. during the winter and -4 hours during the summer.
  394.  
  395. Discussion of Daylight Savings Time
  396. -----------------------------------
  397. The setting in the Date & Time control panel for Daylight Savings time 
  398. is a universal setting. That is, it assumes everybody in the world is 
  399. observing Daylight Savings time when its checkbox is selected.
  400.  
  401. If other areas of the world are not observing Daylight Savings time when 
  402. the checkbox is selected in the Date & Time control panel, then the Map 
  403. control panel will be off by an hour for all areas that are not recognizing
  404. Daylight Savings time.
  405.  
  406. Conversely, if you set the Map control panel to an area that does not observe
  407. Daylight Savings time and deselect/uncheck the checkbox for Daylight Savings 
  408. time in the Date & Time control panel, then time in all areas celebrating 
  409. Daylight Savings time will be off by an hour in the Map control panel.
  410.  
  411. Example:
  412.      In the case of Hawaiians, sometimes they are three hours
  413.      behind Pacific Standard Time (PST) and sometimes two hours
  414.      behind Pacific Daylight Time (PDT). The Map control panel
  415.      can only calculate differences between time zones relative
  416.      to Greenwich Mean Time (GMT). Hawaii will always show up as
  417.      three hours past the Pacific time zone and five hours past
  418.      the Central time zone.
  419.  
  420.      When Hawaiians are not observing Daylight Savings time, but
  421.      the rest of the country is, there is no combination of
  422.      settings in Map and Date & Time control panels which will
  423.      enable you to display Hawaiian local time correctly AND
  424.      concurrently display the correct time in other places that
  425.      do observe Daylight Savings time.
  426.  
  427.      The knowledge about which countries observe Daylight Savings
  428.      time and which do not is not built into the Map control
  429.      panel, so it does not allow for such a complex calculation.
  430.  
  431.      This same situation also occurs in other parts of the world
  432.      besides Hawaii. Phoenix, Arizona is an example of an area of
  433.      the U.S. which also does not observe Daylight Savings time.
  434.  
  435. Conclusion:
  436. MacZip only know the GMT and DST offsets for the current time, not 
  437. for the time in question.
  438.  
  439.  
  440. Projects & Packages:
  441. --------------------
  442.  
  443. A Note to version numbers: Version of MacZip is currently 1.00 and
  444. is based on the zip-code version 2.3 and unzip-code version 5.4.
  445. See About-Box for current version and compiler build-date.
  446.  
  447. Because of the amount of sources I splitted this port into
  448. serveral projects. See http://www.sitec.net/maczip for updates.
  449.  
  450. - core source parts:
  451.     unzxxx.zip
  452.     zipxxx.zip
  453.       These archives contains the main-parts of the port. You can build
  454.       libraries and a standalone-App with Metrowerks standard console SIOUX.
  455.       They contain only sources, no executables.
  456.       These archives are exact copies of the standard Info-ZIP source
  457.       distributions; they were only repacked under MacOS using MacZip,
  458.       with one minor addition: For those files that are stored in BinHex'ed
  459.       format in the Info-ZIP reference source archives, unpacked version
  460.       that are ready for use have been added.
  461.  
  462. - additional source part:
  463.     MacZipxxx.zip: contains all the GUI-staff and the project-files to
  464.       build the main-app.  Only sources of the GUI, no zip- or unzip-code.
  465.       To build MacZip successfully you will need to also download the zip-
  466.       and unzip-packages.
  467.  
  468. - executables:
  469.     MacZipxxxnc.hqx: contains only executables and some docs,
  470.                       version without en-/decryption support
  471.     MacZipxxxc.hqx:  contains only executables and some docs, Crypt version
  472.  
  473. - encryption sources:
  474.     zcryptxx.zip: To build crypt-versions of MacZip.
  475.     download from ftp://ftp.icce.rug.nl/infozip/ (and subdirectories)
  476.  
  477.  
  478.  
  479. Credits:
  480. --------
  481.  
  482. Macstuff.c and recurse.c: All the functions are from More Files.
  483. More Files fixes many of the broken or underfunctional
  484. parts of the file system. Thanks to Jim Luther.
  485. (see morefiles.doc)
  486.  
  487. MatWild.c: Originally C++ code written by JJS (jstrout@ucsd.edu).
  488.  
  489.  
  490.  
  491. ---------------------------------------------------------------------------
  492. Footnotes:
  493.  
  494. 1. wild card:      
  495.     The '*' is a wild card and means 'all files'
  496.     Just in case you don't know wild cards:
  497.     '*' is a place holder for any character.
  498.     e.g.: 
  499.     "this*" matches with "this_file" or  "this_textfile" but it
  500.     don't matches with "only_this_file" or  "first_this_textfile"
  501.     "*this*" matches with "this_file" or  "this_textfile" AND
  502.     matches with "only_this_file" or  "first_this_textfile"
  503.  
  504.  
  505. 2. Mac pathnames:
  506. The following characteristics of Macintosh pathnames should be noted:
  507.  
  508.     A full pathname never begins with a colon, but must contain at 
  509.     least one colon. 
  510.     A partial pathname always begins with a colon separator except in 
  511.     the case where the file partial pathname is a simple file or 
  512.     directory name. 
  513.     Single trailing separator colons in full or partial pathnames are 
  514.     ignored except in the case of full pathnames to volumes. 
  515.     In full pathnames to volumes, the trailing separator colon is required. 
  516.     Consecutive separator colons can be used to ascend a level from a 
  517.     directory to its parent directory. Two consecutive separator colons 
  518.     will ascend one level, three consecutive separator colons will ascend 
  519.     two levels, and so on. Ascending can only occur from a directory; 
  520.     not a file. 
  521.  
  522.  
  523.  
  524.  
  525.  
  526. ---------------------------------------------------------------------------
  527.  
  528. Dirk Haase
  529. ==========
  530.